#define _LED_MODULE_

#include "osObjects.h"
#include "pincfg.h"
#include "ledctr.h"
#include "rtctime.h"
#include "humitempctrlib.h"

HUMITEMP_CTR_PAR_Type TempCtrPar;

/*****************************************************************************//*!
*
* @brief   led task.
*     
* @param   none
*
* @return  none
*
* @ Pass/ Fail criteria: none
*****************************************************************************/
void LedCtrTask(void *argument)
{
    OS_ERR      os_err;
    
    uint32_t TaskCnt = 0;
    
    for(;;){
        OSTimeDly (250, OS_OPT_TIME_DLY, &os_err);
        
        
        Led1() = !Led1();
        
        if(0 == (TaskCnt & 0x01))
            Led2() = !Led2();
        
        if(0 == (TaskCnt & 0x03)){
            Led3() = !Led3();
            TimeRun();
        }
        
        HumiTempCtr(&TempCtrPar);
        
        TaskCnt++;
    }
}